Jx.declare('Jx.platform.browser.lib.Dom', {
	
	$singleton: true,
	
	isDom: function(node, number){

		return !!node &&

			typeof node == 'object' &&

			'nodeType' in node &&

			Jx.isNumber(node.nodeType) &&

			(!Jx.isNumber(number) || node.nodeType == number);

	},
	
	isView: function(win){
		
		return !!win &&
		
			typeof win == 'object' &&
			
			'document' in win &&
			
			this.isDom(win.document, 9);
		
	},
	
	getOwnerView: function(node){

		var doc = this.getOwnerDocument(node);
		
		return doc && (
			
			'defaultView' in doc ?
			
				doc.defaultView
				
				:
				
				'parentWindow' in doc ?
					
					doc.parentWindow
					
					:
					
					void(0)
			
		);

	},
	
	getOwnerDocument: function(node){
			
		return this.isDom(node) ?
			
			node.nodeType == 9 ?
				
				node
				
				:
				
				node.ownerDocument
				
			:
			
			this.isView(node) ?
				
				node.document
				
				:
				
				void(0);

	},
	
	createElement: function(doc, config){
		
		
		
	}
	
});
